package com.demonzym.data.infos;

import java.util.ArrayList;
import java.util.Iterator;

public class HistoryData {
	public String ID;
	
	public HistoryData(String id){
		ID = id;
	}
	
	private static ArrayList<DishData> list = new ArrayList<DishData>();
	
	public static void putHistory(DishData dishData){
		if(list.size() == 0){
			list.add(dishData);
			return;
		}
		
		Iterator<DishData> iterator = list.iterator();
		while(iterator.hasNext()){
			if(!iterator.next().id.equals(dishData.id)){
				list.add(dishData);
				return;
			}
			
		}
	}
	
	public static ArrayList<DishData> getHistory(){
		return list;
	}
}
